from rest_framework import generics
from goods.models import GoodsCategory
from meiduo_admin.serializers.categories import Category3Serializer


class Category3View(generics.ListAPIView):
    # 查询第三级分类，数据特点是：有上级，无下级
    queryset = GoodsCategory.objects.filter(subs__isnull=True)
    serializer_class = Category3Serializer
